package exercise4;

import exercise4.Account;

public class Customer {
	private String firstname;
	private String lastname;
	private Account account;
	public Account[] accounts=new Account[6];
	public int NumOfAccounts=0;
	public Customer (String f,String l) {
			firstname=f;
			lastname=l;
	}
	public String getFirstName() {
			return firstname;
	}
	public String getLastName() {
		return lastname;
	}
	public void setAccount(Account acct) {
			account=acct;
	}
	public Account getAccount() {
			return account;
	}
	public void addAccount(SavingsAccount a) {
			accounts[NumOfAccounts]=a;
			NumOfAccounts+=1;
	}
	public void addAccount(CheckingAccount a) {
			accounts[NumOfAccounts]=a;
			NumOfAccounts+=1;
	}
	public Account getAccount(int a) {
			return accounts[a];
	}
	public void addAccount(Account a) {
			accounts[NumOfAccounts]=a;
			NumOfAccounts+=1;
	}
	public int getNumOfAccounts() {
			return NumOfAccounts;
	}
}
